#九九乘法表
b = c = list(range(1,10)) #左侧倒输出

for i in c[::-1]:
    for j in b[::-1]:
        print("{}*{}={:2}".format(i,j,i*j),end=' ')
    del b[-1]
    print()

for i in range(9,0,-1): #左侧反向输出
    for j in range(i,0,-1):
        print('{}*{}={:<3}'.format(i,j,j*i),end='')
    print('')




for i in range(1,10):   #左侧正向输出
    for j in range(1,i+1):
        print("{}*{}={:<3}".format(j,i,j*i),end=' ')
    print()



num = 9   #右侧正向输出
for i in range(1,10):
    num -= 1
    print(" " * 9 * num, end='')
    for j in range(i,0,-1):
        print("{}*{}={:<5}".format(i,j,j * i), end='')
    print()

num = 0 #右侧倒输出
cbc = list(range(1,10))
b = cbc[:]
for i in cbc[::-1]:
    print(' '*9*num,end='')
    for j in b[::-1]:
        print("{}*{}={:<5}".format(i,j,i*j),end='')
    num +=1
    del b[-1]
    print()

